package com.neu.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.neu.base.Result;
import com.neu.entity.ProgressRecord;
import com.neu.mapper.ProgressRecordMapper;
import com.neu.service.ProgressRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ProgressRecordServiceImpl extends ServiceImpl<ProgressRecordMapper, ProgressRecord> implements ProgressRecordService {
    @Autowired
    ProgressRecordMapper progressRecordMapper;


    @Override
    public Result findByTaskId(String taskId) {
        LambdaQueryWrapper<ProgressRecord> queryWrapper = new LambdaQueryWrapper();
        queryWrapper.eq(ProgressRecord::getTaskId, taskId);
        return Result.success(progressRecordMapper.selectList(queryWrapper));
    }
}